home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mission to McDonaldLand
/
Mission To McDonaldLand.iso
/
calnz.dxr
/
00017_Script_nuker
< prev
next >
Wrap
Text File
|
1998-10-25
|
1KB
|
61 lines
property NukeStatus,nukelist,callback,DT
on birth me
set nukeStatus = FALSE
set callBAck = VOID
set nukeList = []
set DT = 0
append(the actorlist,me)
return me
end
On nukeObj me,NukeThis,CallBackP
set callBack = callBackP
append(nukeList,NukeThis)
set nukeStatus = TRUE
end
on nukeAll me,Objs,callBackP,delayTimeP
set callBack = callBackP
set DT = the ticks + delayTimeP
set total = count(the objectList of objs)
if total>0 then
repeat with i = 1 to total
if (count(the objectList of objs) > 1) then
set objToDel = getat(the objectList of objs ,2)
NukeObj(me,objToDel,CallBAck)
deleteat (the objectList of objs,2)
else
set ObjToDel = getat(the objectList of objs,1)
NukeObj(me,objToDel,CallBack)
deleteat (the objectList of objs,1)
end if
end repeat
end if
end
on Stepframe me
if NukeStatus then
put the ticks &&DT
if (the ticks) >= DT then
repeat with killObj in nukeList
kill(killObj)
end repeat
set nukeStatus = FALSE
set nukeList = []
if voidP(callBack) = FALSE then
do callback
end if
end if
end if
end
on kill me
delfromactorlist(me)
end